package cn.daneijiaoyuarrys;

import java.util.Arrays;

public class Day06firstone {
    public static void main(String[] args) {
    int[] from={1,2,3,4,5};
    int[] two= Arrays.copyOf(from,5);
    System.out.println(Arrays.toString(two));
    int[] two2= Arrays.copyOf(from,10);
    System.out.println(Arrays.toString(two2));
    int[] two3= Arrays.copyOf(from,3);
    System.out.println(Arrays.toString(two3));
    int[] two4= Arrays.copyOfRange(from,2,4);//指定手卫元素的数组
        System.out.println(Arrays.toString(two4));//指定是下标，左臂右开，含头不含尾


    }
}
